Technical Q&As
NW 48 - 68K Open Transport Code on Power Macintoshes (14-March-97)
Q
I'm writing some test code using OTStreamOpen. When I compile this code for PowerPC
and run it on a Power Mac, it works just fine. When I compile this code for 68K and
run it on a 68K, it also works fine. When I compile it for 68K and run it on a
PPC, my application quits immediately. What's going on?
A
Open Transport has special Mixed Mode glue that allows 68K clients to run
successfully on Power Macintoshes. This glue is only available for a subset of
the Open Transport API routines. This has caused some confusion, which the OT
1.1.1 SDK attempts to correct by placing the routines in distinct header files.
The only routines that are callable by 68K clients running emulated on PPC
machines are those defined in "OpenTransport.h", "OpenTptAppleTalk.h" and
"OpenTptInternet.h". All routines defined in all other header files
(specifically those in "OpenTptClient.h" and "OpenTptCommon.h") are available
only to PPC-native clients on PPC machines, or 68K clients on 68K machines.
In addition, non-application code (such as OT modules, drivers, port scanner and
configurators) will only run under the native architecture. For example, it's
not possible to compile an OT driver as 68K code and have it run on a PPC.
In general, we recommend that you build all your Open Transport application code
fat, both to run as quickly as possible and to guarantee future compatibility
(see Technical Q&A NW 40).
-- Quinn "The Eskimo!"
Worldwide Developer Technical Support
Technical Q&As
Previous Question |
Contents |
Next Question
To contact us, please use the Contact Us page.